import { sendOrderStatementWriteOffCode } from '@/api/order'
import { ref } from 'vue'

// 发送接单核销码加载
const loading = ref(false)

/**
 * 发送接单核销码方法
 * @param {string} id - 工单id
 */
const send = async (id: string) => {
  loading.value = true
  const res = await sendOrderStatementWriteOffCode(id)
  loading.value = false
  return res.data as { data: object; code: number; message: string; success: boolean }
}

export default {
  loading,
  send,
}
